import axios from "../utils/request/interceptor";

export default {
  /**
   * 登录
   */
  async login(data: any) {
    return (await axios.post("/auth/login", data)).data;
  },
  async logout() {
    return (await axios.post("/auth/logout")).data;
  },
  async getUserInfo(userId: number) {
    return (await axios.get(`/user/getUserInfo?userId=${userId}`)).data;
  }
};
